<template>
  <div class='operation-wrapper both-100'>
    <div class="list controls-list">
      <custom-title title="安全联系人"> 
        <template #utils> 
          <el-button class="btn_warning" @click="oneAlarm">一键告警</el-button>
        </template>
      </custom-title>
      <base-table :tableModel="operateList" :tableItemConfig="operateListConfig" stripe height="250" v-loading="operateLoading"> 
      </base-table>
    </div>
  </div>
</template>

<script>
import { listAlarmOperate,listAlarmMessage } from '@/api'
export default {
  dicts: ['operate_type','operate_status','read_status'],
  props: {
    value: {
      require: true
    }
  },
  data() {
    return {
      // 操作列表
      operateList: [],
      operateListConfig: [        
        {
          prop: 'operateAccount',
          label: '姓名'
        },
        {
          prop: 'operateName',
          label: '角色'
        },
        {
          prop: 'operateMobile',
          label: '联系电话'
        },
    
      ],
      operateLoading: false,
    };
  },
  computed: {},
  created() {
    this.getList(this.value)
  },
  methods: {
    async getList(data) {
      const params = {
        alarmId: data
      }
      this.operateLoading = true
      const alarmOperate = await listAlarmOperate(params)
      this.initAlarmOperateList(alarmOperate)
    },
    initAlarmOperateList(operate) {
      this.operateList = operate.rows
      this.operateLoading = false
    },
    oneAlarm() {
      this.$message.error('message')
    }
  },
  components: {},
}
</script>